package common.model.weixin;

import common.enumenumeration.Event;
import common.enumenumeration.MsgType;
import common.model.weixin.message.*;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;

@XmlRootElement(name = "xml")
public class Message {
    private String ToUserName;
    private String FromUserName;
    private Long CreateTime;
    private MsgType MsgType;// 消息类型
    private Event event;// 消息事件
    private String Content;// 文本内容
    private int ArticleCount;// 文章数量
    private List<Item> Articles;
    private Image Image;
    private Music Music;
    private Video Video;
    private Voice Voice;
    private String EventKey;
    private String Location_X;
    private String Location_Y;
    private String Label;
    private String Encrypt;

    public String getEncrypt() {
        return Encrypt;
    }

    @XmlElement(name = "Encrypt")
    public void setEncrypt(String encrypt) {
        Encrypt = encrypt;
    }

    public String getToUserName() {
        return ToUserName;
    }

    @XmlElement(name = "ToUserName")
    public void setToUserName(String toUserName) {
        ToUserName = toUserName;
    }

    public String getFromUserName() {
        return FromUserName;
    }

    @XmlElement(name = "FromUserName")
    public void setFromUserName(String fromUserName) {
        FromUserName = fromUserName;
    }

    public Long getCreateTime() {
        return CreateTime;
    }

    @XmlElement(name = "CreateTime")
    public void setCreateTime(Long createTime) {
        CreateTime = createTime;
    }


    public MsgType getMsgType() {
        return MsgType;
    }

    @XmlElement(name = "MsgType")
    public void setMsgType(MsgType msgType) {
        MsgType = msgType;
    }

    public String getContent() {
        return Content;
    }

    @XmlElement(name = "Content")
    public void setContent(String content) {
        Content = content;
    }

    public String getLocation_X() {
        return Location_X;
    }

    @XmlElement(name = "Location_X")
    public void setLocation_X(String location_X) {
        Location_X = location_X;
    }

    public String getLocation_Y() {
        return Location_Y;
    }

    @XmlElement(name = "location_Y")
    public void setLocation_Y(String location_Y) {
        Location_Y = location_Y;
    }


    public int getArticleCount() {
        return ArticleCount;
    }

    @XmlElement(name = "ArticleCount")
    public void setArticleCount(int articleCount) {
        ArticleCount = articleCount;
    }

    public List<Item> getArticles() {
        return Articles;
    }

    @XmlElementWrapper(name = "Articles")
    @XmlElement(name = "item")
    public void setArticles(List<Item> articles) {
        Articles = articles;
    }


    public Event getEvent() {
        return event;
    }

    @XmlElement(name = "Event")
    public void setEvent(Event event) {
        this.event = event;
    }

    public Image getImage() {
        return Image;
    }

    @XmlElement(name = "Image")
    public void setImage(Image image) {
        Image = image;
    }

    public Music getMusic() {
        return Music;
    }

    @XmlElement(name = "Music")
    public void setMusic(Music music) {
        Music = music;
    }

    public Video getVideo() {
        return Video;
    }

    @XmlElement(name = "Video")
    public void setVideo(Video video) {
        Video = video;
    }

    public Voice getVoice() {
        return Voice;
    }

    @XmlElement(name = "Voice")
    public void setVoice(Voice voice) {
        Voice = voice;
    }

    public String getEventKey() {
        return EventKey;
    }

    @XmlElement(name = "EventKey")
    public void setEventKey(String eventKey) {
        EventKey = eventKey;
    }

    public String getLabel() {
        return Label;
    }

    @XmlElement(name = "Label")
    public void setLabel(String label) {
        Label = label;
    }

}
